var Area = function(){



var createInfoStore = new Ext.data.JsonStore(
			{
				url : '../project/searchProjects.form?status=10&timesnap=' + new Date().getTime(),
				root : 'result',
				fields : [ 'PROJECT_ID', 'PROJECT_NAME', 'AREA_ID',
						'PROJECT_TYPE', 'EST_AMT', 'PROJECT_CREATE_DT',
						'EST_DT', 'JOIN_LEADER', 'CUSTOMER_NAME', 'STAFF_NUM',
						'CONTACT_PERSON', 'OFF_TEL', 'MOBILE', 'EMAIL',
						'PROJECT_TARGET', 'CUST_REQ', 'SERVICE_REQ',
						'IMP_FUNC', 'OWNER_PROVIDE', 'REMARK', 'COMPETITOR',
						'PROJECT_OWNER', 'INVOLVE_DT', 'ADVANTAGE',
						'DISADVANTAGE', 'CREATE_USER', 'CREATE_DT', 'MOD_USER',
						'MOD_DT' ]
			});
	var xg = Ext.grid;
	var sm = new xg.CheckboxSelectionModel();
	var createGrid = new Ext.grid.GridPanel({
	
	sm: sm,
		width : 930,
		height : 300,
		store : createInfoStore,
		scope : this,
		listeners : {
			scope : this,
			rowmousedown : function(grid,index,e){
				var data = grid.store.getAt(index).data;
	
			}
		},
		columns : [
		sm,
				   {header:'区域编号',sortable: true,width: 150,dataIndex:'PROJECT_ID'},
		           {header:'区域名称',sortable: true,width: 100, dataIndex:'PROJECT_NAME'}
		           ],
       bbar:new Ext.PagingToolbar({
		 pageSize: 5,
         store: createInfoStore,
         displayInfo: true,
         displayMsg: '显示第 {0} 条到 {1} 条记录，一共 {2} 条',
         emptyMsg: "没有记录..."
       })
	});


this.createArea = new Ext.form.FormPanel({


frame : true,
		width : 800,
		fileUpload: true, 
		labelWidth : 85,
		buttons : [
		           {text:'新增',icon: '../resources/icons/add.png',scope:this,handler:function()
		           		{addUser.show();	}
		           		},
		           {text:'查询',icon: '../resources/icons/find.png',scope:this,handler:function()
		           		{searchUser.show();	}
		           		},
		           	{text:'修改',icon: '../resources/icons/application_edit.png',scope:this,handler:function()
		           		{editUser.show();	}
		           		},
		           	{text:'删除',icon: '../resources/icons/cross.png',scope:this,handler:function()
		           		{saveTract();	}//messbox Ext.messbox.confirm('d','choose')
		           		}
		           ],
		           
		items : [{layout:'column',defaults:{layout:'form'},
			      items:[
			            ]
				},createGrid],
//					},sellGrid,followRec],
	   listeners: {
	    	render: {fn:function(){ 
					
					
					//strackStore.load();
			}}
		}
	});
	

};